import App from './App'
import store from './store' // 引入store
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
import {
	showToast,
	getPageJump,
	setTimeJumpTo
} from '@/utils/util.js';
import {
	api
} from '@/api/api.js'; // api
import mixinCommon from '@/mixins/common.js'
import routeParams from '@/mixins/routeParams.js'
import {
	request
} from '@/utils/request.js';
/**
 * util
 */
Vue.prototype.showToast = showToast;
Vue.prototype.getPageJump = getPageJump;
Vue.prototype.setTimeJumpTo = setTimeJumpTo;

/**
 * api 请求
 */
Vue.prototype.$api = api;
Vue.prototype.$http = request;



/**
 * 全局混入
 */
Vue.mixin(mixinCommon)
Vue.mixin(routeParams)

Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
	...App,
	store
})

app.$mount()
// #endif

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
export function createApp() {
	const app = createSSRApp(App)
	return {
		app
	}
}
// #endif